<!DOCTYPE html>
<html>

<head>
    <!-- google统计 Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-8L1HRY0BD5"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', 'G-8L1HRY0BD5');
    </script>

    <meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
	<title><?php jiangqie_seo_title(); ?></title>
    <link rel="shortcut icon" href="/favicon.ico" />
    <link rel="bookmark" href="/favicon.ico" type="image/x-icon"　/>
	<meta http-equiv='content-language' content='zh-CN'>
<!--    <script data-ad-client="ca-pub-6243451787655828" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>-->
	<?php wp_head(); ?>
	<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>?ver=1">

    <!--浏览器SEO优化-->
    <?php if(is_home() || is_category()){?>
        <meta itemprop="title" name="title" content="<?php jiangqie_seo_title(); ?>">
        <meta itemprop="image" content="/favicon.ico">
        <meta itemprop="url" content="<?php echo site_url(); ?>">
        <meta data-n-head="true" data-hid="og:title" property="og:title" content="<?php jiangqie_seo_title(); ?>">
        <meta data-n-head="true" data-hid="og:image" property="og:image" content="/favicon.ico">
        <meta data-n-head="true" data-hid="og:url" property="og:url" content="<?php echo site_url(); ?>">
    <?php } ?>
    <?php if(is_single()){ ?>
        <meta name="name" content="<?php jiangqie_seo_title(); ?>">
        <meta itemprop="title" name="title" content="<?php jiangqie_seo_title(); ?>">
<!--        <meta itemprop="description" name="description" content="--><?php //the_excerpt(); ?><!--">-->
        <meta itemprop="author" name="author" content="FPVOne穿越机">
        <meta itemprop="url" content="<?php echo site_url().'/'.get_the_ID().'.html'; ?>">
        <meta itemprop="image" content="<?php the_post_thumbnail_url() ?>?thumbnail=1">
        <meta itemprop="uploadDate" content="<?php the_date('Y-m-d H:i:s') ?>">
        <meta itemprop="datePublished" content="<?php the_date('Y-m-d H:i:s') ?>">
        <meta data-n-head="true" data-hid="og:type" property="og:type" content="article">
        <meta data-n-head="true" data-hid="og:title" property="og:title" content="<?php jiangqie_seo_title(); ?>">
        <meta data-n-head="true" data-hid="og:image" property="og:image" content="<?php the_post_thumbnail_url() ?>?thumbnail=1">
        <meta data-n-head="true" data-hid="og:url" property="og:url" content="<?php echo site_url().'/'.get_the_ID().'.html'; ?>">
        <script type="application/ld+json">
            {
              "@context": "https://schema.org",
              "@type": "NewsArticle",
              "headline": "<?php jiangqie_seo_title(); ?>",
              "image": [
                "<?php the_post_thumbnail_url() ?>?thumbnail=1"
               ],
              "datePublished": "<?php the_date('Y-m-d H:i:s') ?>",
              "dateModified": "<?php the_date('Y-m-d H:i:s') ?>"
            }
        </script>
    <?php } ?>
	<script>
		var gCatId = undefined;
		var gTagId = undefined;
		var gAuthorId = undefined;
		<?php

		if (is_category()) {
		    $catID = $cat;
			echo 'gCatId = ' . $cat;
		} else if (is_tag()) {
			$tagName = single_tag_title('', false);
			$tagObject = get_term_by('name', $tagName, 'post_tag');
			$tagID = $tagObject->term_id;
			echo 'gTagId = ' . $tagID;
		} else if (is_author()) {
			echo 'gAuthorId = ' . $author;
		}

		?>
	</script>
</head>

<body>
	<header>
		<?php ?>
		<!--主导航-->
		<nav id="top-nav-wraper" class="container">
			<div class="menu-icon">
				<span class="fas">
					<img src="<?php echo get_stylesheet_directory_uri() . '/images/fa-menu.png'; ?>">
                    <img style="transform: rotate(308deg);width: 40px;height: 40px;position: absolute;top: 16px;left: 50px;" src="<?php echo get_stylesheet_directory_uri() . '/images/fa-pointer.gif'; ?>"
				</span>
			</div>
			<a class="logo" href="<?php echo home_url(); ?>"><?php jiangqie_site_logo() ?></a>
			<?php
			$menus = get_nav_menu_locations();
			if (isset($menus['main-menu'])) {
				wp_nav_menu([
					'theme_location' => 'main-menu',
					'container' => 'div',
					'container_class' => 'nav-box',
					'menu_class' => 'nav-items',
				]);
			} else { ?>
				<div class="nav-box">
					<ul class="nav-items">
						<li class="menu-item"><a href="https://www.jiangqie.com/docs#jqfree" target="_blank">新朋友请参考酱茄主题安装文档</a></li>
					</ul>
				</div>
			<?php }
			?>
			<div class="search-icon">
				<span class="fas">
					<img src="<?php echo get_stylesheet_directory_uri() . '/images/fa-search.png'; ?>">
				</span>
			</div>
			<div class="cancel-icon">
				<span class="fas">
					<img src="<?php echo get_stylesheet_directory_uri() . '/images/fa-close.png'; ?>">
				</span>
			</div>
			<form method="get" action="<?php bloginfo('url'); ?>/">
				<input type="search" class="search-data" placeholder="输入搜索内容" value="" name="s" id="s" required style="color:black;">
				<button type="submit">搜索</button>
			</form>
		</nav>
	</header>